package com.service;

import java.net.MalformedURLException;
import java.rmi.AlreadyBoundException;
import java.rmi.Naming;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;

/**
 * @description:
 * @author: lipy
 * @create: 2020-08-30 10:21
 **/

public class RmiRegist {
    public static final String url = "rmi://127.0.0.1:8080/rimHello";

    public static void main(String[] args) throws RemoteException, AlreadyBoundException, MalformedURLException {
        IHello hello = new Hello();
        LocateRegistry.createRegistry(8080);
        Naming.bind("rmi://127.0.0.1:8080/rimHello", hello);
        System.out.println(" rmi server start = " );
    }
}
